    <nav class="navbar navbar-fixed-top navbar-inverse" role="navigation">
      <div class="container">
      
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            <span class="sr-only">随意论坛</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="/forum">随意论坛</a>
        </div>
        
        <!--.navbar-collapse -->
        <#if session['user']??>
			<ul class="nav navbar-nav navbar-right">
			<li>
			<#if session['user'].headPortraitImg==null>
				<img src="${contextPath}/resources/web/image/userdefualt.png" 
							class="img-circle " style="margin-top: 10%;width: 45px;height: 45px;"/>
			<#else>
				<img id="headPortraitImgSrc" src="${session['user'].head_portrait_img}"
						 	class="img-circle " style="margin-top: 10%;width: 45px;height: 45px;"/>
					
			</#if>
			</li>
        	<li class="dropdown">
							 <a href="#" class="dropdown-toggle" data-toggle="dropdown">${session['user'].userName}<strong class="caret"></strong></a>
							<ul class="dropdown-menu">
								<li>
									 <a href="${contextPath}/modify">个人信息</a>
								</li>
								<li>
									 <a href="${contextPath}/section">我的帖子</a>
								</li>
								<li>
									 <a href="${contextPath}/addSection">发帖</a>
								</li>
								<li class="divider">
								</li>
								<li>
									 <a href="#">信息(0)条</a>
								</li>
								<li class="divider">
								</li>
								<li>
									 <a href="${contextPath}/loginout">退出</a>
								</li>
							</ul>
						</li>
						<li class="dropdown">
						 <a href="#" onclick="return false;"></a>
						</li>
				</ul>
        <#else>
        <div id="navbar" class="navbar-collapse collapse">
          <form class="navbar-form navbar-right" role="form" action="${contextPath}/login/checklogin" method="post">
            <div class="form-group">
              <input placeholder="Username" name="user.user_name" class="form-control" type="text">
            </div>
            <div class="form-group">
              <input placeholder="Password" name="user.user_password" class="form-control" type="password">
            </div>
            <button type="submit" class="btn btn-success">登 录</button>
            <a class="btn btn-danger" href="${contextPath}/register">注 册</a>
          </form>
        </div>
        </#if>
        <!--/.navbar-collapse -->
        
	   </div>
    </nav><!-- /.navbar -->